package homework.test6;

import homework.test1.Animal;

public class Test {
    public static void main(String[] args) {

        method(new Dog());
    }

    public static void method(Animals a){
        a.eat();
        if(a instanceof Dog){
            Dog d = (Dog)a;
            d.watchHome();
        }
    }
}

